import request from '@/utils/request'

export function getStoreList() {
  return request({
    url: 'store/queryList',
    method: 'post'
  })
}

export function add(data) {
  if (data.id) {
    delete data.id
    delete data.createUser
    delete data.createType
    delete data.createUser
  }
  return request({
    url: 'store/add',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'store/update',
    method: 'post',
    data
  })
}

export function getSList(data) {
  return request({
    url: '/store/cpt/getCptStore?storeId=' + data,
    method: 'get',
    data
  })
}

export function addSList(data) {
  return request({
    url: '/store/cpt/addCptStore',
    method: 'post',
    data
  })
}
